Skip to content

Conversation

@mrava87
Copy link
Contributor

@mrava87 mrava87 commented Jan 31, 2026

This PR adds support for UV to PyProximal:

  • update pyproject.toml
  • add uv.lock*
  • add targets in Makefile
  • add build action in GA
  • update readthedocs
  • Currently created with the following set of commands:
uv venv --python 3.13
uv lock
uv sync --locked --all-extras --all-groups 

It also modernizes the overall tooling:

  • move content of setup.cfg to pyproject.toml
  • switch from black/flake8/isort to ruff
  • add coverage support with upload to codacy (like pylops)

Finally, it contains various improvements to the documentation:

  • add installation instructions for uv
  • use sphinx-design to have tabs in installation instructions for conda/pip/uv
  • added emojii in main section titles

@mrava87 mrava87 marked this pull request as draft January 31, 2026 20:27
@mrava87 mrava87 marked this pull request as ready for review February 5, 2026 18:42
@mrava87 mrava87 requested a review from cako February 5, 2026 18:42
Copy link

@cako cako left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good! The website looks great. Left a few comments. For some improvements I'd consider:

  • Use nox for local testing different Python versions
  • Retire Makefile (doesn't work natively on Windows, but nox does)
  • Default to uv, then conda, then pip.

Also, for the segmentation.py example to work, I need to crank up the maxiter to 30. Otherwise I get:

    r = _zeros._bisect(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
RuntimeError: Failed to converge after 20 iterations.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line complains when I run docs. Two suggestions: format this file with ruff and use raw string (r"\.py").

Copy link
Contributor Author

@mrava87 mrava87 Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now efdfd9c

Also I noticed that running ruff on the file did not give any error (but flake8 did)... ChatGPT suggested to add some flake8 behaviors to ruff in pyproject.toml based on the errors I was getting with flake8 and not with ruff - but this now breaks the flake8 CI, will be fixed in a separate PR as described in #244.

Finally note that I run uv run ruff format docs/source/conf.py, so the file is changed a bit in few other places 😄

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file still required?

Copy link
Contributor Author

@mrava87 mrava87 Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess same for requirements.txt?

For now I kept it because I was allowing one to use pip to create an environment, but I think we can just change the instructions to pip install .[dev]... will do that and get rid of these files 😄

Copy link
Contributor Author

@mrava87 mrava87 Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, change of plan... completely removed the requirements* files and any use/mention of them - 0235ecb, 308a007

We have now only conda and uv as two alternative setups 😄 For pure pip venv-based environments we used to provide commands with the requirements files, I tried using dependency-groups but that apparently does not work, so I think it is time to retire it - if someone wants to use it at the own risk, I am sure they can figure out how to install the required dependencies by hand 😉

@mrava87 mrava87 mentioned this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants